package com.xt.LibaryDeskManager.job;

import com.xt.LibaryDeskManager.service.SeatService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 每天24点执行任务
 */

public class SeatStatueJob implements Job {
    @Autowired
    private SeatService seatService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        try {
            int a=seatService.updateSeat();
            System.out.println(a);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
